export function myRequestAnimationFrame(callback) {
    if (requestAnimationFrame) {
        return requestAnimationFrame(() => {
            callback();
        });
    }
    else {
        return setTimeout(() => {
            if (performance && performance.now) {
                return callback(performance.now());
            }
            else {
                return callback(Date.now());
            }
        }, 1000 / 60);
    }
}
export function cancelMyRequestAnimationFrame(id) {
    if (cancelAnimationFrame) {
        cancelAnimationFrame(id);
    }
    else {
        clearTimeout(id);
    }
}
